Skip to content

Conversation

@miguelafsilva5
Copy link
Member

@miguelafsilva5 miguelafsilva5 commented May 22, 2025

PR Description

This PR aims to stantardize the vMPU driver and to the some extend the MPU API. This was needed to support different MPU implementations.
A major goal of this PR is remove the complexity from the MPU driver and move it to the vMPU.

In order to comply with these modifications to the vMPU, the MPU driver for armv8-r was also updated

josecm and others added 5 commits August 18, 2025 13:41
This API simplifies the implementation of vMPU entries
coalescense.
Updating a region requires a broadcast to the other
CPUs on the same address space.
This commit also fixes the install of the VM images
where MPU entries on other cores were not correctly
unmaped.

Signed-off-by: Daniel Oliveira <[email protected]>
Signed-off-by: Miguel Silva <[email protected]>
Add functionality to lock entries on the vMPU to prevent hypervisor
MPU entries from being removed.

Signed-off-by: Daniel Oliveira <[email protected]>
This reduces the number of vMPU/MPU entries.

Signed-off-by: Daniel Oliveira <[email protected]>
Signed-off-by: Miguel Silva <[email protected]>
@miguelafsilva5 miguelafsilva5 force-pushed the ref/vmpu branch 3 times, most recently from b5d134b to c058b4e Compare August 18, 2025 15:19
@josecm
Copy link
Member

josecm commented Aug 18, 2025

@miguelafsilva5 Please check for typos in commit messages. Also, the sentence after : should start lowecase.

danielRep and others added 2 commits August 19, 2025 11:32
To simplify boot code we run with mpu disabled until the mem init.

Signed-off-by: Daniel Oliveira <[email protected]>
Initally, when mapping and copying, the destination region was being
created with the same size of the original region, instead of the size of
the data being copied

Signed-off-by: Miguel Silva <[email protected]>
@miguelafsilva5
Copy link
Member Author

@miguelafsilva5 Please check for typos in commit messages. Also, the sentence after : should start lowecase.

@josecm should be fixed already. Thank you

@danielRep
Copy link
Member

@miguelafsilva5 Please check for typos in commit messages. Also, the sentence after : should start lowecase.

@josecm should be fixed already. Thank you

@miguelafsilva5 commit 2922a2d still has a typo. Should be "deallocate"

@miguelafsilva5
Copy link
Member Author

@miguelafsilva5 Please check for typos in commit messages. Also, the sentence after : should start lowecase.

@josecm should be fixed already. Thank you

@miguelafsilva5 commit 2922a2d still has a typo. Should be "deallocate"

@danielRep my bad- Missed it. Its fixed now. Thank you

Removed the complexity from the MPU driver related to the merge
of regions, which was moved to the vMPU level.
Removed the creation of MPU entries during boot.

Signed-off-by: Miguel Silva <[email protected]>
During the context switch of MPU regions, locked entries are not
disabled.

Signed-off-by: Miguel Silva <[email protected]>
Added a function that deallocates a vMPU entry whenever the mpu fails
to insert a region.

Signed-off-by: Miguel Silva <[email protected]>
@DavidMCerdeira DavidMCerdeira self-requested a review August 20, 2025 10:30
@danielRep danielRep requested review from danielRep and removed request for AfonsoSantos96 August 20, 2025 10:49
@josecm josecm merged commit a7a02e7 into main Aug 20, 2025
31 checks passed
@josecm josecm deleted the ref/vmpu branch August 20, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants